<%@page import="auxilary.Constants"%>
<%@page import="auxilary.Links"%>
<%@page import="auxilary.Actions"%>
<%@ page language="java" contentType="text/html; charset=windows-1255"
    pageEncoding="windows-1255"%>
<jsp:include page="/frames/start.jsp" />
	<%=Links.Css.COURSE %>
	<%=Links.Scripts.COURSE %>
	<%=Links.Scripts.NEW_COURSE %>
<jsp:include page="/frames/frame.jsp" />
			<div class="tops">
				<a class="top" href ="<%=Links.Pages.SEARCH %>">Search for courses</a>
				<a class="top" href ="<%=Links.Pages.COURSES_BASE %>">See all courses</a>
			</div>
			<h1>Add a new course</h1>
			<form id="course-form" class="course-form" action="javascript:addCourse()">
				<div class="box">
					<div class="left">Name</div>
					<div class="right">
						<input type="text" class="name-field" name="name" />
						<select id="group" name="group">
							<option value="-1">Select group...</option>
							<jsp:include page="/helpers/groups.jsp"></jsp:include>
						</select>
						<input type="text" size="1" name="group-number" class="group-number" />
					</div>
				</div>
				<div class="box">
					<div class="left">Description</div>
					<div class="right"><textarea name="description"></textarea></div>
				</div>
				<hr />
				<div class="box">
					<div class="left">Credits</div>
					<div class="right"><input type="text" name="credits" size="1" /></div>
				</div>
				<div class="box">
					<div class="left">Capacity</div>
					<div class="right"><input type="text" name="capacity" size="4" /></div>
				</div>
				<hr />
				<div class="box">
					<div class="left">Sessions:</div>
					<div class="right">
						<select id="session-count">
							<option value="1">1</option>
							<option value="2">2</option>
							<option value="3">3</option>
							<option value="4">4</option>
						</select>
					</div>
				</div>

				<div class="box">
					<div class="left">Day and Time:</div>
					<div class="right">
						<div id="session-1">
							<select id="day-1">
								<jsp:include page="/helpers/sessionDay.jsp" />
							</select>
							<div class="words">From</div>
							<select id="start-1">
								<jsp:include page="/helpers/sessionHours.jsp" />
							</select>
							<div class="words">Until</div>
							<select id="end-1">
								<jsp:include page="/helpers/sessionHours.jsp" />
							</select>
						</div>
						<div id="session-2">
							<select id="day-2">
								<jsp:include page="/helpers/sessionDay.jsp" />
							</select>
							<div class="words">From</div>
							<select id="start-2">
								<jsp:include page="/helpers/sessionHours.jsp" />
							</select>
							<div class="words">Until</div>
							<select id="end-2">
								<jsp:include page="/helpers/sessionHours.jsp" />
							</select>
						</div>
						<div id="session-3">
							<select id="day-3">
								<jsp:include page="/helpers/sessionDay.jsp" />
							</select>
							<div class="words">From</div>
							<select id="start-3">
								<jsp:include page="/helpers/sessionHours.jsp" />
							</select>
							<div class="words">Until</div>
							<select id="end-3">
								<jsp:include page="/helpers/sessionHours.jsp" />
							</select>
						</div>
						<div id="session-4">
							<select id="day-4">
								<jsp:include page="/helpers/sessionDay.jsp" />
							</select>
							<div class="words">From</div>
							<select id="start-4">
								<jsp:include page="/helpers/sessionHours.jsp" />
							</select>
							<div class="words">Until</div>
							<select id="end-4">
								<jsp:include page="/helpers/sessionHours.jsp" />
							</select>
						</div>
					</div>
				</div>
				<input type="hidden" name="action" value="<%=Actions.Course.NEW %>" />
				<center><div id="course-error" class="error"></div></center>
				<br />
				<hr />
				<div class="box last">
					<input type="submit" value="Create" />
					<input type="button" value="Cancel" onclick="window.location.href='<%=Links.Pages.COURSES_BASE %>'" />
				</div>
			</form>
<jsp:include page="/frames/end.jsp" />